Skip to content

Conversation

@GWSzeto
Copy link
Contributor

@GWSzeto GWSzeto commented Nov 13, 2024

  • tokenId and setToken introduced at the parent level ClaimableModule
  • Claim Conditions are fetched at the parent level

https://linear.app/thirdweb/issue/DES-251/claimable-erc721-erc1155-erc20


PR-Codex overview

This PR primarily modifies the Claimable module and related components to enhance functionality and improve user experience by adding token ID management and updating claim conditions.

Detailed summary

  • Changed condition for rendering ClaimableModule to check for "Claimable" instead of "Claimable-ignore".
  • Updated logic in CurrencySelector for checking initialValue.
  • Added tokenId and noClaimConditionSet state management in claimable.stories.tsx.
  • Removed unused getClaimConditionErc1155Stub function.
  • Introduced a checkbox for noClaimConditionSet in the UI.
  • Adjusted claim condition logic to include tokenId validation.
  • Enhanced ClaimableModule with new state and props for token ID management.
  • Updated ClaimableModuleUI to handle token ID input and validation.
  • Refactored ClaimConditionSection to check for claim conditions and manage form state.
  • Added warning alert for cases with no claim conditions set.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@vercel
Copy link

vercel bot commented Nov 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 6:19pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Nov 14, 2024 6:19pm
thirdweb_playground ⬜️ Skipped (Inspect) Nov 14, 2024 6:19pm
wallet-ui ⬜️ Skipped (Inspect) Nov 14, 2024 6:19pm

@changeset-bot
Copy link

changeset-bot bot commented Nov 13, 2024

⚠️ No Changeset found

Latest commit: 92e55c8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 13, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Nov 13, 2024
@codecov
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.52%. Comparing base (5de5c44) to head (92e55c8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5413   +/-   ##
=======================================
  Coverage   45.52%   45.52%           
=======================================
  Files        1070     1070           
  Lines       55665    55665           
  Branches     4030     4030           
=======================================
  Hits        25341    25341           
  Misses      29637    29637           
  Partials      687      687           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 5de5c44
packages 40.62% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.8 KB (0%) 896 ms (0%) 606 ms (+42.3% 🔺) 1.6 s
thirdweb (cjs) 105.11 KB (0%) 2.2 s (0%) 1.1 s (+25.41% 🔺) 3.2 s
thirdweb (minimal + tree-shaking) 5.72 KB (0%) 115 ms (0%) 167 ms (+335.46% 🔺) 281 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 8 ms (-16.03% 🔽) 18 ms
thirdweb/react (minimal + tree-shaking) 18.78 KB (0%) 376 ms (0%) 220 ms (+179.36% 🔺) 596 ms

@gregfromstl gregfromstl changed the title Updated Claimable [Dashboard] Feature: Updated Claimable Nov 13, 2024
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 13, 2024 23:15 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 13, 2024 23:15 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 13, 2024 23:15 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 13, 2024 23:22 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 13, 2024 23:22 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 13, 2024 23:22 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 13, 2024 23:31 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 13, 2024 23:31 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 13, 2024 23:31 Inactive
@MananTank
Copy link
Member

The messaging in "No Claim Condition Set" alert is a bit confusing - there is no "Set claim condition" button. We should not show the form at all when there is no claim condition set. It should be just Alert + Add claim condition button and we show the form and remove the alert when you click on "Add claim condition" button

image

@vercel vercel bot temporarily deployed to Preview – wallet-ui November 14, 2024 17:36 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 14, 2024 17:36 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 14, 2024 17:36 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 14, 2024 17:38 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 14, 2024 17:38 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 14, 2024 17:38 Inactive
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 14, 2024

Merge activity

- tokenId and setToken introduced at the parent level ClaimableModule
- Claim Conditions are fetched at the parent level

https://linear.app/thirdweb/issue/DES-251/claimable-erc721-erc1155-erc20

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the `ClaimableModule` functionality by refining claim conditions, improving token ID handling, and updating UI components for better user experience.

### Detailed summary
- Updated claim condition checks for `ClaimableModule`.
- Added `tokenId` state management in `ClaimableModule`.
- Modified claim condition logic to handle ERC721 and ERC1155 tokens.
- Enhanced UI with a new checkbox for "No Claim Condition Set".
- Improved currency selection logic in `CurrencySelector`.
- Refined `pricePerUnit` handling in `claimable.stories.tsx`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 14, 2024 18:09 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 14, 2024 18:09 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground November 14, 2024 18:09 Inactive
@graphite-app graphite-app bot merged commit 92e55c8 into main Nov 14, 2024
31 of 32 checks passed
@graphite-app graphite-app bot deleted the claimable-updates branch November 14, 2024 18:19
@vercel vercel bot temporarily deployed to Production – thirdweb_playground November 14, 2024 18:19 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui November 14, 2024 18:19 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 November 14, 2024 18:19 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dashboard Involves changes to the Dashboard.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants